package cn.people.internal.sso.business.base.model.dbo;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 数据库对象基础类
 *
 * @author ray
 * @Create: 2020/5/9
 */
@Data
@Document(indexName = "global", type = "_doc")
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 6454259245388493436L;

    // 必须指定一个id，
    @Id
    private long content_id;
    // 这里配置了分词器，字段类型，可以不配置，默认也可
    @Field(analyzer = "title_index", type = FieldType.Text)
    private String title;
    @Field(analyzer = "title_index", type = FieldType.Text)
    private String sub_title;
    @Field(analyzer = "title_index", type = FieldType.Text)
    private String pre_title;
    @Field(analyzer = "title_index", type = FieldType.Text)
    private String short_title;
    @Field(analyzer = "content_search", type = FieldType.Text)
    private String content;
    @Field(type = FieldType.Keyword)
    private String source;
    @Field(type = FieldType.Byte)
    private Integer state;
    @Field(type = FieldType.Date)
    private String publish_time;
    @Field(type = FieldType.Byte)
    private Integer type;
    @Field(type = FieldType.Text)
    private String url;
    @Field(type = FieldType.Date)
    private String input_time;
    @Field(analyzer = "content_search", type = FieldType.Text)
    private String belong_name;
    @Field(type = FieldType.Keyword)
    private String net;
    @Field(type = FieldType.Keyword)
    private String keyword;


}
